<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>   
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>cart list</title>
</head>
<body>
<form action="cart.do" name="search" method="get">
	<table width="200" align="center" border="0" cellspacing="0" cellpadding="2">
			<tr>
				<td align="center">
					<select name="keyField">
						<option value="userid">회원 아이디</option>
						<option value="or_name">회원 이름</option>
						<option value="p_code">상품 코드</option>
						<option value="or_status">주문 상태</option>
						<option value="all">모두</option>
					</select>
				</td>
				<td>
					<input type="text" size="16" name="keyWord">
				</td>
				<td>
					<input type="submit" value="검색">
				</td>
			</tr>
		</table>
		
		<br>
		
		<table width="80%" border="1" cellspacing="0" cellpadding="2">
			<tr bgcolor="#F3F3F3">
				<th width="10%">번호</th>
				<th width="30">회원 아이디</th>
				<th width="20%">주문 상품 명</th>
				<th width="20%">주문자명</th>
				<th width="10%">주문 상품 코드</th>
				<th width="10">상태</th>
			</tr>
			<tr bgcolor="#777777">
				<td height="1" colspan="6"></td>
			</tr>
			<c:forEach var="article" items="${list}">
				<tr>
					<td align="center" width="10%">
						${number}
						<c:set var="number" value="${number-1}"/>   
					</td>
					<td>${article.userid}</td>
					<td width="10%"><a href="cartDetail.do?or_num=${article.or_num}">${article.or_name}</a></td>
					<td width="20%">${article.or_dname}</td>
					<td width="10%">${article.p_code}</td>
					<td width="10%">${article.or_status}</td>
				</tr>
			</c:forEach>
			<c:if test="${count == 0 }">
				<tr align="center">
					<td colspan="6">등록된 게시물이 없습니다.</td>
				</tr>
				<tr bgcolor="#777777">
					<td height="1" colspan="6"></td>
				</tr>
			</c:if>
			<tr>
				<td align="center" colspan="6">${pagingHtml}</td>
			</tr>
		</table>

</body>
</html>    